<?php
session_start();

require("../database.php");
include("header.php");
?>
<link href="../quiz.css" rel="stylesheet" type="text/css">

<?php
extract($_POST);

echo "<BR>";
if (!isset($_SESSION[alogin]))
{
	echo "<br><h2><div  class=head1>You are not Logged On Please Login to Access this Page</div></h2>";
	echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";
	exit();
}
//echo "<BR><h3 class=head1>Add Question </h3>";
if($_POST[submit]=='Save' || strlen($_POST['testid'])>0 )
{
extract($_POST);
mysql_query("insert into mst_question(test_id,que_desc,ans1,ans2,ans3,ans4,true_ans) values ('$testid','$addque','$ans1','$ans2','$ans3','$ans4','$anstrue')",$cn) or die(mysql_error());
echo "<center><h2><p align=center>Question Added Successfully.</p></h2>";
echo "</br><h3><a href='questionadd.php'>return back</a></h3></center>";
unset($_POST);
}
?>
